$ () ->
	$("#update_btn").click (e) ->
		param=
			last_name: $("#last_name").val()
			first_name: $("#first_name").val()
			password: $("#password").val()
			confirmPassword: $("#confirmPassword").val()

		$.post "/api/admin/user/update-oneself",param,(res) ->
			if res.status.errCode is 0
				alert "修改成功"
				window.location.reload()
			else
				alert res.status.message
